# Contributor: Timo Teräs <timo.teras@iki.fi>
# Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=bubblewrap
pkgver=0.10.0
pkgrel=1
pkgdesc="Unprivileged sandboxing tool"
url="https://github.com/containers/bubblewrap"
arch="all"
license="LGPL-2.0-or-later"
options="!check" # Testsuite fails
makedepends="bash meson libcap-dev docbook-xsl"
subpackages="$pkgname-doc $pkgname-bash-completion $pkgname-zsh-completion"
source="bubblewrap-$pkgver.tar.gz::https://github.com/containers/bubblewrap/archive/v$pkgver.tar.gz"

# secfixes:
#   0.10.0-r0:
#     - CVE-2024-42472
#   0.4.1-r0:
#     - CVE-2020-5291

build() {
	abuild-meson \
		-Drequire_userns=true \
		-Dman=enabled \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
f46490fe5b8a49be4bee6e178dec039fee3f9cca11a9c2ef08da2371e7fc10cb7dcadf3b23c5d5f45f29e97a6516cd7d54594afe4c0527b71f5c82e93a19eb31  bubblewrap-0.10.0.tar.gz
"
